<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button id="jqBtn">jQuery按钮</button>
<button id="jsBtn">JavaScript按钮</button>
<script type="text/javascript">
    window.onload = function () {
        document.getElementById('jsBtn').onclick = function () {
            alert('JavaScript按钮被点击');
        }
    }
</script>
<script type="text/javascript" src="https://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('#jqBtn').click(function () {
            alert('jQuery按钮被点击');
        });
    });
</script>
</body>
</html>